.class public Lcom/example/m6wmr/StartActivity;
.super Landroid/app/Activity;
.source "StartActivity.java"


# instance fields
.field private appdataver:Ljava/lang/String;

.field private cursor:Landroid/database/Cursor;

.field private db:Landroid/database/sqlite/SQLiteDatabase;

.field h:Landroid/os/Handler;

.field private helper:Ldbclass/DBOpenHelper;

.field m:Lmyapp/MyApp;

.field private mcontext:Landroid/content/Context;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 44
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 47
    iput-object v0, p0, Lcom/example/m6wmr/StartActivity;->m:Lmyapp/MyApp;

    .line 50
    iput-object v0, p0, Lcom/example/m6wmr/StartActivity;->cursor:Landroid/database/Cursor;

    .line 98
    new-instance v0, Lcom/example/m6wmr/StartActivity$1;

    invoke-direct {v0, p0}, Lcom/example/m6wmr/StartActivity$1;-><init>(Lcom/example/m6wmr/StartActivity;)V

    iput-object v0, p0, Lcom/example/m6wmr/StartActivity;->h:Landroid/os/Handler;

    .line 44
    return-void
.end method

.method static synthetic access$0(Lcom/example/m6wmr/StartActivity;)Landroid/content/Context;
    .locals 1

    .prologue
    .line 45
    iget-object v0, p0, Lcom/example/m6wmr/StartActivity;->mcontext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$1(Lcom/example/m6wmr/StartActivity;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 46
    iget-object v0, p0, Lcom/example/m6wmr/StartActivity;->appdataver:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$2(Lcom/example/m6wmr/StartActivity;)Landroid/database/sqlite/SQLiteDatabase;
    .locals 1

    .prologue
    .line 49
    iget-object v0, p0, Lcom/example/m6wmr/StartActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    return-object v0
.end method


# virtual methods
.method public getadv()Z
    .locals 1

    .prologue
    .line 222
    new-instance v0, Lcom/example/m6wmr/StartActivity$3;

    invoke-direct {v0, p0}, Lcom/example/m6wmr/StartActivity$3;-><init>(Lcom/example/m6wmr/StartActivity;)V

    .line 299
    invoke-virtual {v0}, Lcom/example/m6wmr/StartActivity$3;->start()V

    .line 300
    const/4 v0, 0x0

    return v0
.end method

.method public getupdateconfig()Z
    .locals 1

    .prologue
    .line 169
    new-instance v0, Lcom/example/m6wmr/StartActivity$2;

    invoke-direct {v0, p0}, Lcom/example/m6wmr/StartActivity$2;-><init>(Lcom/example/m6wmr/StartActivity;)V

    .line 217
    invoke-virtual {v0}, Lcom/example/m6wmr/StartActivity$2;->start()V

    .line 218
    const/4 v0, 0x0

    return v0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 6
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 53
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 54
    const v3, 0x7f03003e

    invoke-virtual {p0, v3}, Lcom/example/m6wmr/StartActivity;->setContentView(I)V

    .line 55
    invoke-virtual {p0}, Lcom/example/m6wmr/StartActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v3

    check-cast v3, Lmyapp/MyApp;

    iput-object v3, p0, Lcom/example/m6wmr/StartActivity;->m:Lmyapp/MyApp;

    .line 56
    iget-object v3, p0, Lcom/example/m6wmr/StartActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v3}, Lmyapp/MyApp;->getActivity()Ljava/util/ArrayList;

    move-result-object v0

    .line 57
    .local v0, "activityList":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Landroid/app/Activity;>;"
    invoke-virtual {v0, p0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 58
    iput-object p0, p0, Lcom/example/m6wmr/StartActivity;->mcontext:Landroid/content/Context;

    .line 60
    new-instance v3, Ldbclass/DBOpenHelper;

    iget-object v4, p0, Lcom/example/m6wmr/StartActivity;->mcontext:Landroid/content/Context;

    invoke-direct {v3, v4}, Ldbclass/DBOpenHelper;-><init>(Landroid/content/Context;)V

    iput-object v3, p0, Lcom/example/m6wmr/StartActivity;->helper:Ldbclass/DBOpenHelper;

    .line 61
    iget-object v3, p0, Lcom/example/m6wmr/StartActivity;->helper:Ldbclass/DBOpenHelper;

    invoke-virtual {v3}, Ldbclass/DBOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v3

    iput-object v3, p0, Lcom/example/m6wmr/StartActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    .line 63
    const-string v3, "Appset"

    .line 64
    const/4 v4, 0x0

    .line 63
    invoke-virtual {p0, v3, v4}, Lcom/example/m6wmr/StartActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v2

    .line 65
    .local v2, "preferences":Landroid/content/SharedPreferences;
    const-string v3, "appdataver"

    const-string v4, "0"

    invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, p0, Lcom/example/m6wmr/StartActivity;->appdataver:Ljava/lang/String;

    .line 88
    new-instance v1, Landroid/os/Message;

    invoke-direct {v1}, Landroid/os/Message;-><init>()V

    .line 90
    .local v1, "msg":Landroid/os/Message;
    const/4 v3, 0x5

    iput v3, v1, Landroid/os/Message;->arg1:I

    .line 92
    iget-object v3, p0, Lcom/example/m6wmr/StartActivity;->h:Landroid/os/Handler;

    const-wide/16 v4, 0x9c4

    invoke-virtual {v3, v1, v4, v5}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 95
    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .prologue
    .line 307
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 308
    iget-object v0, p0, Lcom/example/m6wmr/StartActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    if-eqz v0, :cond_0

    .line 309
    iget-object v0, p0, Lcom/example/m6wmr/StartActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 311
    :cond_0
    iget-object v0, p0, Lcom/example/m6wmr/StartActivity;->cursor:Landroid/database/Cursor;

    if-eqz v0, :cond_1

    .line 312
    iget-object v0, p0, Lcom/example/m6wmr/StartActivity;->cursor:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    .line 314
    :cond_1
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 3
    .param p1, "keyCode"    # I
    .param p2, "event"    # Landroid/view/KeyEvent;

    .prologue
    .line 318
    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    .line 319
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getAction()I

    move-result v0

    if-nez v0, :cond_0

    .line 320
    new-instance v0, Landroid/app/AlertDialog$Builder;

    iget-object v1, p0, Lcom/example/m6wmr/StartActivity;->mcontext:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 321
    const-string v1, "\u63d0\u793a"

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    .line 322
    const-string v1, "\u786e\u5b9a\u9000\u51fa"

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    .line 323
    const-string v1, "\u786e\u5b9a"

    .line 324
    new-instance v2, Lcom/example/m6wmr/StartActivity$4;

    invoke-direct {v2, p0}, Lcom/example/m6wmr/StartActivity$4;-><init>(Lcom/example/m6wmr/StartActivity;)V

    .line 323
    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    .line 340
    const-string v1, "\u53d6\u6d88"

    .line 341
    new-instance v2, Lcom/example/m6wmr/StartActivity$5;

    invoke-direct {v2, p0}, Lcom/example/m6wmr/StartActivity$5;-><init>(Lcom/example/m6wmr/StartActivity;)V

    .line 340
    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    .line 347
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    .line 348
    const/4 v0, 0x1

    .line 350
    :goto_0
    return v0

    :cond_0
    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_0
.end method
